﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% block title %}{% endblock%} | 小饭桌后台管理系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="{%static 'adminlte/plugins/fontawesome-free/css/all.min.css' %}">
    <link rel="stylesheet"
          href="{%static 'adminlte/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css' %}">
    <link rel="stylesheet" href="{%static 'adminlte/plugins/icheck-bootstrap/icheck-bootstrap.min.css' %}">
    <link rel="stylesheet" href="{%static 'adminlte/plugins/jqvmap/jqvmap.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/dist/css/adminlte.min.css' %}">
    <link rel="stylesheet" href="{% static 'adminlte/plugins/overlayScrollbars/css/OverlayScrollbars.min.css' %}">

    <link rel="stylesheet" href="{% static 'adminlte/plugins/summernote/summernote-bs4.css' %}">
    <link rel="stylesheet" href="{% static 'sweetalert/sweetalert.css' %}">
    <link rel="stylesheet" href="{% static 'css/cms/base.min.css' %}">
    <script src="{% static 'adminlte/plugins/jquery/jquery.min.js'%}"></script>
    <script src="{% static 'adminlte/dist/js/adminlte.js'%}"></script>
    <!--  <script src="{% static 'adminlte/plugins/jquery-ui/jquery-ui.min.js'%}"></script>-->

    <script src="{% static 'js/jquery-3.3.1.min.js' %}" charset="utf-8"></script>
    <script src="{% static 'sweetalert/sweetalert.min.js'%}" charset="utf-8"></script>
    <script src="{% static 'js/xfzalert.min.js'%}" charset="utf-8"></script>
    <script src="{% static 'js/xfzajax.min.js'%}" charset="utf-8"></script>
    <script src="{% static 'js/news_category.min.js'%}" charset="utf-8"></script>
    <script src="{% static 'js/message.min.js' %}" charset="utf-8"></script>
    {% block head %}{% endblock %}
</head>
<body class="hold-transition sidebar-mini layout-fixed">
<div class="wrapper">>
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <!-- Left navbar links -->
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <!--        <a href="#" class="nav-link">CMS管理系统</a>-->
            </li>
            <li class="nav-item d-none d-sm-inline-block">
                <a href="#" class="nav-link">Contact</a>
            </li>
        </ul>

        <!--    搜索-->
        <form class="form-inline ml-3">
            <div class="input-group input-group-sm">
                <input class="form-control form-control-navbar" type="search" placeholder="Search" aria-label="Search">
                <div class="input-group-append">
                    <button class="btn btn-navbar" type="submit">
                        <i class="fas fa-search"></i>
                    </button>
                </div>
            </div>
        </form>

    </nav>
    <aside class="main-sidebar sidebar-dark-primary elevation-4">
        <!-- Brand Logo -->
        <a href="#" class="brand-link">
            <span class="brand-text font-weight-light">小饭桌管理平台</span>
        </a>

        <!-- Sidebar -->
        <div class="sidebar">
            <!-- Sidebar user panel (optional) -->
            <div class="user-panel mt-3 pb-3 mb-3 d-flex">
                <div class="image">
                    <img src="{% static 'images/user.jpg'%}" class="img-circle elevation-2" alt="User Image">
                </div>
                <div class="info">
                    <a href="#" class="d-block">大姑凉</a>
                </div>
            </div>
            <nav class="mt-2">
                <ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu"
                    data-accordion="false">
                    <li class="nav-item">
                        <a href="{% url 'cms:index' %}" class="nav-link">
                            <i class="nav-icon fas fa-book"></i>
                            <p>
                                首页
                            </p>
                        </a>
                    </li>
                    <li class="nav-header">新闻管理</li>
                    {% if perms.news.change_news %}
                        <li class="nav-item">
                            <a href="{% url 'cms:news_list' %}" class="nav-link">
                                <i class="nav-icon fas fa-list"></i>
                                <p>
                                    新闻列表
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{% url 'cms:write_news' %}" class="nav-link">
                                <i class="nav-icon far fa-edit"></i>
                                <p>
                                    发布新闻
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{% url 'cms:news_category' %}" class="nav-link">
                                <i class="nav-icon far fa-edit"></i>
                                <p>
                                    新闻分类
                                </p>
                            </a>
                        </li>
                        <li class="nav-item">
                            <a href="{% url 'cms:banners' %}" class="nav-link">
                                <i class="nav-icon far fa-window-restore"></i>
                                <p>
                                    轮播图
                                </p>
                            </a>
                        </li>
                    {% endif %}
                    {% if perm.course.change_course %}
                        <li class="nav-header">课程管理</li>
                        <li class="nav-item">
                            <a href="{% url 'cms:pub_course' %}" class="nav-link">
                                <i class="nav-icon far fa-edit"></i>
                                <p>
                                    发布课程
                                </p>
                            </a>
                        </li>
                    {% endif %}
                    {% if user.is_superuser %}
                        <li class="nav-header">员工管理</li>
                        <li class="nav-item">
                            <a href="{% url 'cms:staffs' %}" class="nav-link">
                                <i class="nav-icon fas fa-comments"></i>
                                <p>
                                    添加员工
                                </p>
                            </a>
                        </li>
                    {% endif %}
                </ul>
            </nav>
        </div>
        <!-- /.sidebar -->

    </aside>
    <div class="content-wrapper" style="min-height:372px;">
        <div class="conetent-header head-margin">
            {% block content-header %}
            {% endblock%}
        </div>
        <section class="content">
            {% block content %}
            {% endblock%}
        </section>
    </div>
</div>
<!-- ./wrapper -->


</body>
</html>
